#ifndef QPARAMTREEWIDGET_H
#define QPARAMTREEWIDGET_H

#include <QTreeWidget>

struct tagValueGroup;

class QParamTreeWidget : public QTreeWidget
{
    Q_OBJECT
public:
    explicit QParamTreeWidget(QWidget *parent = 0);

    void    clear();
protected:
    void    contextMenuEvent(QContextMenuEvent *);
    void    mousePressEvent(QMouseEvent *event);
    void    item_edited(QTreeWidgetItem *item);
protected:
    friend class QParamItemDelegate;
public slots:
    void    set_params(tagValueGroup* group);

protected slots:
    void    value_changed();
    void    update_all();
signals:
    
public slots:
protected:
    QMap<QString,QTreeWidgetItem*>      m_code_to_item;
    QMap<QTreeWidgetItem*,QString>      m_item_to_code;
    tagValueGroup                       *m_group;
};

#endif // QPARAMTREEWIDGET_H
